package com.wgts.wgts.mvp.view.activity.otherhomepage;

import android.os.Parcel;
import android.os.Parcelable;

/*
 *
 *
 *   data:2018/9/1714:22
 *
 */public class ShopClassData implements Parcelable{
     private String title;
     private String url;
     private Integer id;

    protected ShopClassData(Parcel in) {
        title = in.readString();
        url = in.readString();
        if (in.readByte() == 0) {
            id = null;
        } else {
            id = in.readInt();
        }
    }

    public static final Creator<ShopClassData> CREATOR = new Creator<ShopClassData>() {
        @Override
        public ShopClassData createFromParcel(Parcel in) {
            return new ShopClassData(in);
        }

        @Override
        public ShopClassData[] newArray(int size) {
            return new ShopClassData[size];
        }
    };

    public ShopClassData() {

    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(title);
        dest.writeString(url);
        if (id == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(id);
        }
    }
}
